home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
cnet
/
MainMacros.lha
/
MainMacroEdit.rexx
next >
Wrap
OS/2 REXX Batch file
|
1995-04-18
|
2KB
|
59 lines
/* $VER: MainMacroEdit.rexx 1.0 (4/18/95 by Spike Dethman)
*/
/* edit the macros and prompts files for MainMacros */
options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
changewhere 'MainMacroEdit'
path="env:MainMacros/"
path2="envarc:MainMacros/"
macro="MainMacros"
prompt="MainPrompts"
Start:
transmit 'n2** Main Macro Editor by Spike Dethman **'
transmit '===========================================n1'
transmit 'Edits go into effect immediately. Save to ENVARC: to make changes permanant.'
transmit '(Still active after a reboot.)n2'
file=path||prompt ; file2=path2||prompt
transmit 'cfDo you wish to edit the Main prompt list [No]? ?0}' ; getuser 70
if result=1 then call EditFile
file=path||macro ; file2=path2||macro
transmit 'cfDo you wish to edit the Macros list [No]? ?0}' ; getuser 70
if result=1 then call EditFile
bufferflush ; exit
EditFile:
changewhat 'Editing...'
loadeditor (file) ; calleditor (0)
changewhat 'Saving...' ; saveeditor (file)
sendstring 'Counting entries...'
call open(f1,file,'r') ; num=0 ;
do while ~eof(f1) ;
i=readln(f1) ;
num=num+1 ;
sendstring '.' ;
end ; num=num-1 ; call close(f1)
call open(f1,file'Num','w') ;
call writeln(f1,num) ;
call close(f1)
transmit 'n1'num' entries written.'
transmit 'cfn1Save to ENVARC: to survive a reboot [No]? ?0}' ; getuser 70
if result=1 then do ;
address command 'copy "'file'" to "'file2'"' ;
address command 'copy "'file'Num" to "'file2'Num"' ;
transmit 'Saved to ENVARC:' ;
end
return
SYNTAX:
ERROR:
IOERR:
transmit errortext(RC)" error in l "sigl"n1>>"sourceline(sigl)"<<"
bufferflush
exit 10